css: Initialize values to their specified type
authorBenjamin Otte <otte@redhat.com>
Sat, 14 Jan 2012 03:39:07 +0000 (04:39 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Feb 2012 02:13:38 +0000 (03:13 +0100)
.. when parsing.

gtk/gtkcssstyleproperty.c
gtk/gtkcssstylepropertyimpl.c

index 94680389ac536f0aa179ebf0662b82701bc10b1e..9743b8821bbe52c61cd67495032ceb62920f18e1 100644 (file)
@@ -201,7 +201,7 @@ gtk_css_style_property_parse_value (GtkStyleProperty *property,
       return TRUE;
     }
 
-  g_value_init (value, _gtk_style_property_get_value_type (property));
+  g_value_init (value, _gtk_css_style_property_get_specified_type (style_property));
   if (!(* style_property->parse_value) (style_property, value, parser, base))
     {
       g_value_unset (value);
index a6b65fe1d05109e098384932df0287409834bf85..d41048f328f51d82d9497f032e029ee1e9e0b7d6 100644 (file)
@@ -418,8 +418,6 @@ css_image_value_parse (GtkCssStyleProperty *property,
         return FALSE;
     }
 
-  g_value_unset (value);
-  g_value_init (value, GTK_TYPE_CSS_IMAGE);
   g_value_take_object (value, image);
   return TRUE;
 }